package com.jk.dao;

import com.alibaba.dubbo.config.support.Parameter;
import com.jk.pojo.PayLog;
import org.apache.ibatis.annotations.*;
import org.springframework.web.bind.annotation.DeleteMapping;

import java.util.ArrayList;
import java.util.List;

public interface PayLogMapper {
    //分页查询交易记录
    @SelectProvider(type = AutoSplitJointPorvider.class,method = "queryLogList")
    List<PayLog> queryPayLogList(PayLog payLog);

    //分页查询回收站
    @SelectProvider(type = AutoSplitJointPorvider.class,method = "queryRecycleList")
    List<PayLog> queryRecycleList(PayLog payLog);

    //回收站物理批量删除
    //@Param注解的作用是给参数命名,参数命名后就能根据名字得到参数值,正确的将参数传入sql语句中
    @DeleteProvider(type = AutoSplitJointPorvider.class,method = "deleteRecycleList")
    void deleteRecycleList(@Param("list") List<String> list);

    //回收站数据批量还原
    @UpdateProvider(type = AutoSplitJointPorvider.class,method = "updateReduction")
    void updateReduction(@Param("list") List<String> list);

    //交易记录逻辑删除
    @UpdateProvider(type = AutoSplitJointPorvider.class,method = "updateDelete")
    void updateDelete(@Param("logId") String logId);

    //账单查询总条数
    @SelectProvider(type = AutoSplitJointPorvider.class,method = "queryCount")
    int queryCount();

    //账单查询详情数据
    @SelectProvider(type = AutoSplitJointPorvider.class,method = "queryPactList")
    List<PayLog> queryPactList(@Param("start") int start,@Param("end") int end);
}

